package com.witmore.skyline.web.service.third.constants;

import java.time.LocalDate;

/**
 * Description: ApiClient 第三方接口常量
 * Author: 豆子高
 * Date: 2025/2/24 14:26
 */
public class ApiClientCommonConstant {

    // 云机械开发平台api地址
    public final static String API_PREFIX = "http://api.cloudm.com";

    // 公钥
    public final static String API_ACCESS_KEY = "C8909A0F13839EA7F9F5C153DF7F3A92";

    // 私钥
    public final static String API_SECRET_KEY = "C5D39A32DD4729F5F2CFEBDF26C19D54";

    // 获取token接口 地址
    public final static String GET_TOKEN_PATH = "/cmsdk/open/device/checkUser?accessKey=" + API_ACCESS_KEY + "&secretKey=" + API_SECRET_KEY;

    // 获取设备列表接口 地址
    public final static String GET_DEVICE_LIST_PATH = "/cmsdk/open/device/deviceList?token=%s&page=%d&size=%d";

    // 获取设备详情接口 地址
    public final static String GET_DEVICE_DETAIL_PATH = "/cmsdk/open/device/device?token=%s&sn=%s";

    // 获取某天的工作详情
    public final static String GET_DEVICE_WORK_TIME_PATH = "/cmsdk/open/device/workTimeDetails?token=%s&sn=%s&date=%s";

    // 获取某天的工作详情带状态
    public final static String GET_DEVICE_WORK_TIME_STATUS_PATH = "/cmsdk/open/device/workTimeDetailWithStatus?token=%s&sn=%s&date=%s";


    // 获取设备工时
    public final static String GET_DEVICE_WORK_TIME_LIST_PATH = "/cmsdk/open/device/workTimeList?token=%s&sn=%s&startDay=%s&endDay=%s";

    // 获取设备经纬度
    public final static String GET_DEVICE_LOCUS_PATH = "/cmsdk/open/device/locus?token=%s&sn=%s&startTime=%s&endTime=%s";

    // 获取设备油位百分比
    public final static String GET_DEVICE_OIL_PERCENT_PATH = "/cmsdk/open/device/oilLevel?token=%s&sn=%s&startTime=%s&endTime=%s";

    // 获取设备加油数据
    public final static String GET_DEVICE_REFUEL_PATH = "/cmsdk/open/device/statisticsAddOil?token=%s&sn=%s&startTime=%s&endTime=%s";

    // 获取摄像头接口
    public final static String GET_CAMERA_LIST_PATH = "/cmsdk/open/device/cameraInfo?token=%s&sn=%s";

    // 获取摄像头直播地址接口
    public final static String GET_CAMERA_LIVE_PATH = "/cmsdk/open/device/cameraLiveInfo?token=%s&serialNo=%s";

    // 获取设备油耗接口
    public final static String GET_DEVICE_FUEL_CONSUMPTION_PATH = "/cmsdk/open/device/oilConsumption?token=%s&sn=%s&startTime=%s&endTime=%s";

    // 获取设备平均油耗
    public final static String GET_DEVICE_AVERAGE_FUEL_CONSUMPTION_PATH = "/cmsdk/open/device/avgFuelConsumption?token=%s&sn=%s&startTime=%s&endTime=%s";

    // 接口请求方式
    public final static String METHOD_GET = "GET";

    public final static String OSS_FILE_UPLOAD_LOCAL_PREFIX = "skyline/camera/local/%s/"
            + LocalDate.now().getYear() + "/" + LocalDate.now().getMonthValue() + "/";
    public final static String OSS_FILE_UPLOAD_TP_PREFIX = "skyline/camera/tplink/%s/"
            + LocalDate.now().getYear() + "/" + LocalDate.now().getMonthValue() + "/";
    public final static String OSS_FILE_UPLOAD_YS_PREFIX = "skyline/camera/yinshi/%s/"
            + LocalDate.now().getYear() + "/" + LocalDate.now().getMonthValue() + "/";

}
